<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
// 投注|篮球^玩法^倍数^注数^金额
    var a1="01,02,03,04,05,06|01^1^2^1^4";
    var a2="01,02,03,04,05,06,07|02^2^3^7^42";
    function play(param){
        let arr=param.split('|')
        let a=arr[0]
        let b=arr[1]
        a=a.replace(/,/g,'')
        let b1=b.split('^')
        if(b1[1]=='1'){
            b1[1]='00'
        }
         if(b1[3]<10){
            b1[3]='0'+b1[3]
        }
         if(b1[1]=='2'){
             b1[1]='10'
            b1[3]=b1[3]+'*'
        }
         let str=b1[1]+b1[3]+a+'~'+b1[0]+'^#'+b1[2]
         console.log(str)
    }
    play(a1)
    play(a2)
</script>
</html>